# coding:utf-8
"""
    Author: walrus
    Date: 2024/11/7
    File: log_setting.py
"""
import logging

def set_log_config(my_level=logging.INFO):
    log_format = '%(asctime)s - %(levelname)s - %(message)s'
    date_format = '%Y/%m/%d %H:%M:%S'
    # 基本用法
    logging.basicConfig(filename="my.log",
                        level=my_level,
                        format=log_format,
                        datefmt=date_format,
                        encoding="utf-8")